Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make flower-server start server with HTTPS by default #2591

Merged
merged 25 commits into from
Nov 17, 2023

Conversation

panh99
Copy link
Contributor

@panh99 panh99 commented Nov 11, 2023

  • Added --insecure argument to start server without HTTPS.
  • Added --certificates argument to accept paths to (CA certificate, server certificate, and server private key)
  • Added certificates argument to some functions to facilitate the above changes.
  • Added E2E test bare-https to test starting server with SSL-enabled.
  • Added necessary certificates under e2e/certificates/ for testing purposes.
  • Amended e2e/test.sh and e2e/test_driver.sh.

Note

  • flower-server command will fail without either --insecure or --certificates a b c.
  • When --insecure is enabled, --certificates will be ignored. (This is mentioned in the help message.)
  • e2e/bare-https/simulation.py is empty because simulation does not require any certificate.
  • REST server part remains untouched b/c it's different from grpc-rere and grpc-bidi and I am not sure how to unify the three.

@panh99 panh99 marked this pull request as ready for review November 14, 2023 13:56
Copy link
Member

@danieljanes danieljanes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR looks good!

run_driver_api and run_fleet_api are the targets for two additional commands that allow users to start the Driver API and the Fleet API independent of each other (see pyproject.toml:

image

Those two commands will have to support --insecure and --certificates, too. The easiest way to do it is probably through _add_args_common.

danieljanes
danieljanes previously approved these changes Nov 16, 2023
@@ -0,0 +1,30 @@
-----BEGIN CERTIFICATE-----
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would not commit these here but rather generate them each time the test runs and delete them afterwards. It's often easier to commit them, but at the same time, I would prefer to avoid having any secret keys or certificates even for testing committed to prevent any possibility someone might accidentally use them somewhere.

Copy link
Member

@danieljanes danieljanes Nov 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tanertopal wdyt, should we also move the certificates directory into the bare-https dir? They are only required for that single test

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If they are only required here, then let's move it. The directory could also contain the script to generate the certificates.

@danieljanes danieljanes enabled auto-merge (squash) November 17, 2023 11:03
@danieljanes danieljanes merged commit bc346ac into main Nov 17, 2023
27 checks passed
@danieljanes danieljanes deleted the make-https-default branch November 17, 2023 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants